<template>
    <div class="father17">
        <h3>keep-alive缓存路由</h3>
        <router-link to="/keep-alive-test1">test1</router-link>
        <router-link to="/keep-alive-test2">test2</router-link>
        <keep-alive>
            <router-view name="a1"></router-view>
            <router-view name="a2"></router-view>
        </keep-alive>
    </div>
</template>

<script>
export default {
    name: 'Father17',
}
</script>

<style scoped>
a {
    display: inline-block;
    text-decoration: none;
    width: 60px;
    height: 40px;
    border-radius: 6px;
    background-color: mediumpurple;
    color: #fff;
    text-align: center;
    line-height: 40px;
    margin-left: 10px;
}
</style>